package com.ls.pay.repository;

import com.ls.pay.pojo.Customer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * @author 钰杰
 * @className CustomerRepository
 * @description VX:FengYJ996
 * @date 2020/1/719:36
 */
public interface CustomerRepository extends JpaRepository<Customer, Integer> {

    Customer findByAppid(String appid);

    @Query(nativeQuery = true, value = "UPDATE tb_customer SET recharge_amount = ?2 WHERE appid = ?1")
    void updCustomerBalance(String appid, double result);


}